<%--
  Created by IntelliJ IDEA.
  User: 钟
  Date: 2017/3/14
  Time: 9:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="${path}/css/public.css" />
    <link rel="stylesheet"
          href="${path}/css/themes/base/jquery.ui.all.css">
    <link rel="stylesheet" href="${path}/js/demos.css">

    <script type="text/javascript"
            src="${path}/js/jquery-1.7.2.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.core.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.widget.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.position.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.autocomplete.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.datepicker.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.datepicker-zh-CN.js"></script>
    <script src="${path}/js/jquery.ui.button.js"></script>
    <link rel="stylesheet" href="${path}/css/icons.css">
    <script src="${path}/js/icons.js"></script>



    <title>Welcome
    </title>
</head>
<body>

<!--头部 start..-->
<div class="header">


    <div class="top">
        <div class="top_left">
            <span class="f1">欢迎您：${user.username}</span>
        </div>
        <div class="top_right">
            <a href="${path}/user/index" class="top_ico0">首页</a>
            <a href="${path}/user/changepassword" class="top_ico1">修改密码</a>
            <a href="${path}/user/information" class="top_ico2">个人信息</a>
            <a href="${path}/user/exit" class="top_ico3">退出</a>

        </div>
    </div>
    <div class="top2">
        <p class="pro_id">客户关系管理系统 v2.0</p>
    </div>
</div>
<!--head end...-->
<!--主体-->
<table class="main" border="0"
       style="width: 100%; background-color: #FFFFFF">
    <tr>
        <td width="140" style="vertical-align: top;">
            <div class="main_left">

                <script type="text/javascript" src="../js/jquery.ui.accordion.js"></script>

                <script type="text/javascript">
                    $().ready(function() {
                        $('.menuTitle').click(function() {//添加menuTitle的click事件
                            if ($(this).next().is(":hidden")) {//隐藏判断
                                $('.menu_ul_div').slideUp();//隐藏 */
                                $(this).next().slideDown();//显示
                            } else {
                                if ($(this).next().attr("id") == 'menu_ul_div_1') {

                                    $('.menu_ul_div').slideUp();//隐藏 */
                                    $('#menu_ul_div_2').slideDown();//显示

                                }
                                ;
                                if ($(this).next().attr("id") == 'menu_ul_div_2') {

                                    $('.menu_ul_div').slideUp();//隐藏 */
                                    $('#menu_ul_div_3').slideDown();//显示

                                }
                                ;
                                if ($(this).next().attr("id") == 'menu_ul_div_3') {

                                    $('.menu_ul_div').slideUp();//隐藏 */
                                    $('#menu_ul_div_4').slideDown();//显示

                                }
                                if ($(this).next().attr("id") == 'menu_ul_div_4') {

                                    $('.menu_ul_div').slideUp();//隐藏 */
                                    $('#menu_ul_div_1').slideDown();//显示

                                }
                            }
                        });
                    });
                </script>
                <div class="sidebar">

                    <h2 id="menu1" class="menuTitle">客户管理</h2>
                    <div class="menu_ul_div" id="menu_ul_div_1"

                         style="display:none;">
                        <ul id="menu1_ul" class="menu_ul">
                            <li class="menuItem"><a href="${path}/customer/initConflict">客户冲突</a></li>
                            <li class="menuItem"><a href="客户管理/添加客户.html">添加客户</a></li>
                            <li class="menuItem"><a href="客户管理/服务中签约客户.html">服务中签约客户</a></li>
                            <li class="menuItem"><a href="客户管理/未签约客户.html">未签约客户</a></li>
                            <li class="menuItem"><a href="客户管理/未签约-已初试.html">未签约-已初试</a></li>
                            <li class="menuItem"><a href="客户管理/未签约-已复试.html">未签约-已复试</a></li>
                            <li class="menuItem"><a href="客户管理/公海客户.html">公海客户</a></li>
                            <li class="menuItem"><a href="${path}/visitRecord/initSearch">拜访查询</a></li>
                        </ul>
                    </div>


                    <h2 id="menu2" class="menuTitle">合同管理</h2>
                    <div class="menu_ul_div" id="menu_ul_div_2"

                         style="display:none;">
                        <ul id="menu2_ul" class="menu_ul">
                            <li class="menuItem"><a href="合同管理/合同模版.html">合同模版</a></li>
                            <li class="menuItem"><a href="合同管理/新增合同.html">新增合同</a></li>
                            <li class="menuItem"><a href="合同管理/有效合同查询.html">有效合同查询</a></li>
                            <li class="menuItem"><a href="合同管理/无效合同查询.html">无效合同查询</a></li>
                            <li class="menuItem"><a href="合同管理/应收款查询.html">应收款查询</a></li>
                            <li class="menuItem"><a href="合同管理/到款查询.html">到款查询</a></li>
                        </ul>
                    </div>


                    <h2 id="menu3" class="menuTitle">报表管理</h2>
                    <div class="menu_ul_div" id="menu_ul_div_3"

                         style="display:none;">
                        <ul id="menu3_ul" class="menu_ul">
                            <li class="menuItem"><a href="报表管理/拜访量报表.html">拜访量报表</a></li>
                        </ul>
                    </div>


                    <h2 id="menu4" class="menuTitle">系统设置/</h2>
                    <div class="menu_ul_div" id="menu_ul_div_4"
                         style="display:block;"
                    >
                        <ul id="menu4_ul" class="menu_ul">
                            <li class="menuItem"><a href="${path}/user/initUser.action">员工设置</a></li>
                            <li class="menuItem"><a href="${path}/system/announcement/search.action">公告管理</a></li>
                            <li class="menuItem"><a href="系统设置/其他设置.html">其他设置</a></li>
                        </ul>
                    </div>

                </div>

            </div>
        </td>
        <td style="vertical-align: top;">
            <div class="main_right">





                <script type="text/javascript">
                    $(document).ready(function() {

                        $(".reportImg").click(function() {
                            var config = "resizable:no;center:yes;dialogWidth:850px;dialogHeight:400px;dialogTop:100px;dialogLeft:150px";
                            showModalDialog(
                                "../" + this.id + ".action",

                                document, config);
                        });

                        var len = $(".img").length;
                        var index = 0;
                        function show(num) {
                            $(".img").eq(num).show();
                            $(".img").fadeOut();
                            $(".img").eq(num).hide();
                            $(".img").eq(num).fadeIn();
                        }
                        ;
                        function auto() {
                            if (index == len - 1) {
                                index = 0;
                            } else {
                                index += 1;
                            }
                            show(index);
                        }

                        setInterval(auto, 3000);

                        function test() {
                            // 1.统计数据
                            $.post("/crm/index/indexAjax", {awayMonthArray: "0,1"}, function (stat) {
                                //当月数据
                                $("#t1").html(stat[0].countNewCustomer);
                                $("#t2").html(stat[0].countVisit);
                                $("#t3").html(stat[0].sumSigned);
                                $("#t4").html(stat[0].sumPaid);
                                $("#t5").html(stat[0].sumUnpaid);
                                //上月数据
                                $("#t6").html(stat[1].countNewCustomer);
                                $("#t7").html(stat[1].countVisit);
                                $("#t8").html(stat[1].sumSigned);
                                $("#t9").html(stat[1].sumPaid);
                                $("#t10").html(stat[1].sumUnpaid);
                            });

                            // 2.公告信息
                            $.post("/crm/index/announcement", function (announce) {
                                for (var i = 0; i < announce.length; i++) {
                                    $("#myTable").append("<tr><td>" + announce[i].title + "</td><td>" + announce[i].context + "</td></tr>");
                                }
                            });
                        }

                        //异步加载首页数据
                        test();

                    });
                </script>
                <!-- 中部DIV -->
                <div class="main">
                    <div class="content">
                        <div class="dashboard">
                            <div class="content1">


                                <img class="img" src="/crm/system/img.do?id=1566da3c-fe0e-46e1-99f2-c791eb980c1a"
                                     style="width: 100%;height: 100%"/>

                                <img class="img" hidden="hidden"
                                     src="/crm/system/img.do?id=4e5aa330-c35c-49ad-add7-79bd3675069e"
                                     style="width: 100%;height: 100%"/>

                                <img class="img" hidden="hidden"
                                     src="/crm/system/img.do?id=4f011ba7-931a-4e7c-995c-8b72c7b2adee"
                                     style="width: 100%;height: 100%"/>

                            </div>
                            <div class="content2">
                                <h1>
                                    公告信息
                                </h1>

                                <table id="myTable" class="mytable resultTable" style="width: 100%">

                                    <tr>
                                        <th>
                                            标题
                                        </th>
                                        <th>
                                            内容
                                        </th>
                                    </tr>
                                    <tr>
                                        <td>
                                            欢迎使用CRM v2.2
                                        </td>
                                        <td>
                                            建议使用FF,IE7.0+等主流浏览器
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            会议通知
                                        </td>
                                        <td>
                                            周二下午至会议室开销售部门会议
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div class="content3">
                                <h1>
                                    统计数据(该数据每隔30分钟更新一次)
                                </h1>
                                <table class="mytable resultTable" style="width: 100%">

                                    <tr>
                                        <th>
                                            数据项
                                        </th>
                                        <th>
                                            单位
                                        </th>
                                        <th>
                                            上月
                                        </th>
                                        <th>
                                            本月
                                        </th>
                                        <th>
                                            查看历史
                                        </th>
                                    </tr>
                                    <tr>
                                        <td>
                                            新增客户数
                                        </td>
                                        <td>
                                            个
                                        </td>


                                        <td id="t6">
                                            0
                                        </td>

                                        <td id="t1">
                                            0

                                        </td>

                                        <td>
                                            <img id="countNewCustomer" class="reportImg"

                                                 src="/crm/images/report.gif">


                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            拜访总量
                                        </td>
                                        <td>
                                            次
                                        </td>


                                        <td id="t7">
                                            0
                                        </td>

                                        <td id="t2">

                                            0
                                        </td>

                                        <td>
                                            <img id="countVisit" class="reportImg"

                                                 src="/crm/images/report.gif">

                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            签单额
                                        </td>
                                        <td>
                                            元
                                        </td>

                                        <td id="t8">
                                            0.0
                                        </td>

                                        <td id="t3">

                                            0.0
                                        </td>

                                        <td>
                                            <img id="sumSigned" class="reportImg"

                                                 src="/crm/images/report.gif">

                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            收款额
                                        </td>
                                        <td>
                                            元
                                        </td>

                                        <td id="t9">
                                            0.0
                                        </td>

                                        <td id="t4">

                                            0.0
                                        </td>

                                        <td>
                                            <img id="sumPaid" class="reportImg"

                                                 src="/crm/images/report.gif">

                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            应收款余额
                                        </td>
                                        <td>
                                            元
                                        </td>

                                        <td id="t10">
                                            0.0
                                        </td>

                                        <td id="t5">

                                            0.0
                                        </td>

                                        <td>
                                            <img id="sumUnpaid" class="reportImg"

                                                 src="/crm/images/report.gif">

                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div class="content4">
                                <img src="/crm/images/crm-2.jpg"/>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </td>
    </tr>
</table>

<!--主体 end-->

<!--尾部-->
<div class="footer">
    <div class="seperator"></div>
    <p>
        <a href="http://www.sztzedu.com">公司主站</a>|
        <a href="#">隐私策略</a>|
        <a href="#">服务条款</a>&nbsp;
        苏州天智教育公司&reg;版权所有 2012-2015
    </p>

</div>
<!--尾部 end..-->

</body>
</html>

